package com.bolingcavalry.uschedule;

import com.winit.schedule.core.model.*;
import com.winit.schedule.core.task.ScheduleTaskDealMulti;
import com.winit.schedule.core.task.annotation.ScheduleTask;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by wanglin on 2018/5/15.
 */
@ScheduleTask(taskName = "MatrixTestdemoTaskMulti")
public class OrderTaskDealMulti  implements ScheduleTaskDealMulti<String> {

    @Override
    public List<String> selectTasks(Task task) {
        // 查询返回待处理的数据
        // task.getEachFetchDataNum()为控制台配置的每次批量查询数据的数量
        // igone
        return new ArrayList<String>(task.getEachFetchDataNum());
    }

    @Override
    public boolean execute(String[] strings) {
        for( String st:strings){
            System.out.println(st);
        }
        return true;
    }



}